/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.ronin.service;

import com.ronin.dao.api.IMusteriDao;
import com.ronin.model.Musteri;
import com.ronin.model.kriter.MusteriSorguKriteri;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 *
 * @author esimsek
 */
@Service(value = "musteriService")
@Transactional(readOnly =true)
public class MusteriService implements IMusteriService {
    
    @Autowired
    IMusteriDao iMusteriDao;

    @Override
    public Musteri getSingle(Musteri musteri) {
        return iMusteriDao.getSingle(musteri);
    }

    @Override
    public Musteri getSingleById(Long id) {
        return iMusteriDao.getSingleById(id);
    }

    @Override
    public Musteri getSingleOneByNamedQuery(String namedQuery,Object... parameters) {
        return iMusteriDao.getSingleOneByNamedQuery(namedQuery,parameters);
    }

    @Override
    public List<Musteri> getList(Musteri musteri) {
        return iMusteriDao.getList(musteri);
    }

    @Override
    public List<Musteri> getListByNamedQuery(String namedQuery,Object... parameters) {
        return iMusteriDao.getListByNamedQuery(namedQuery,parameters);
    }

    @Override
    public List<Musteri> getListCriteriaForPaging(int first, int pageSize, MusteriSorguKriteri sorguKriteri) {
        return iMusteriDao.getListCriteriaForPaging(first, pageSize, sorguKriteri);
    }

    @Override
    public int getCountByCriteriaForPaging(MusteriSorguKriteri sorguKriteri) {
        return iMusteriDao.getCountByCriteriaForPaging(sorguKriteri);
    }
    
    @Override
    public int getCount(Musteri musteri) {
        return iMusteriDao.getCount(musteri);
    }

    @Override
    @Transactional(readOnly = false, propagation = Propagation.REQUIRED)
    public void add(Musteri musteri) {
        iMusteriDao.add(musteri);
    }

    @Override
    @Transactional(readOnly = false, propagation = Propagation.REQUIRED)
    public void update(Musteri musteri) {
        iMusteriDao.update(musteri);
    }

    @Override
    @Transactional(readOnly = false, propagation = Propagation.REQUIRED)
    public void delete(Musteri musteri) {
        iMusteriDao.delete(musteri);
    }

}
